-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TRUST QA-21: minimum voting delay #990
Conversation
julianmrodri
commented
Oct 24, 2023
- Enforce Minimum voting delay of 1 day (dependes on Network Config)
- Adds test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good
{} | ||
{ | ||
MIN_VOTING_DELAY = | ||
(86400 + NetworkConfigLib.blocktime() - 1) / |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's declare the 86400 figure as a constant just outside the contract
@@ -30,7 +31,9 @@ contract Governance is | |||
// 100% | |||
uint256 public constant ONE_HUNDRED_PERCENT = 1e8; // {micro %} | |||
|
|||
// solhint-disable no-empty-blocks | |||
// solhint-disable-next-line var-name-mixedcase | |||
uint256 public immutable MIN_VOTING_DELAY; // in blocks, based on network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's reference here in the comment that it should be equal to ONE_DAY
, or whatever we end up calling the 86400 figure as a constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do the changes and push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also can use our unit notation {block}
here